package com.wfcm.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.wfcm.dao.WfCourseCommentDao;
import com.wfcm.datasource.DataSourceContextHolder;
import com.wfcm.datasource.DynamicDataSource;
import com.wfcm.datasource.DynamicDataSourceAnnotation;
import com.wfcm.entity.WfCourseCommentEntity;
import com.wfcm.service.WfCourseCommentService;



@Service("wfCourseCommentService")
@DynamicDataSourceAnnotation
public class WfCourseCommentServiceImpl implements WfCourseCommentService {
	@Autowired
	private WfCourseCommentDao wfCourseCommentDao;
	
	@Override
	@DynamicDataSourceAnnotation(dataSource = DataSourceContextHolder.dataSource_comment)
	public WfCourseCommentEntity queryObject(Integer id){
		return wfCourseCommentDao.queryObject(id);
	}
	
	@Override
	@DynamicDataSourceAnnotation(dataSource = DataSourceContextHolder.dataSource_comment)
	public List<WfCourseCommentEntity> queryList(Map<String, Object> map){
		return wfCourseCommentDao.queryList(map);
	}
	
	@Override
	@DynamicDataSourceAnnotation(dataSource = DataSourceContextHolder.dataSource_comment)
	public List<WfCourseCommentEntity> queryCommentList(Map<String, Object> map){
		return wfCourseCommentDao.queryCommentList(map);
	}

	@Override
	@DynamicDataSourceAnnotation(dataSource = DataSourceContextHolder.dataSource_comment)
	public List<WfCourseCommentEntity> queryManageCommentList(Map<String, Object> map){
		return wfCourseCommentDao.queryManageCommentList(map);
	}

	@Override
	@DynamicDataSourceAnnotation(dataSource = DataSourceContextHolder.dataSource_comment)
	public int queryTotal(Map<String, Object> map){
		return wfCourseCommentDao.queryTotal(map);
	}
	
	@Override
	@DynamicDataSourceAnnotation(dataSource = DataSourceContextHolder.dataSource_comment)
	public void save(WfCourseCommentEntity wfCourseComment){
		wfCourseCommentDao.save(wfCourseComment);
	}
	
	@Override
	@DynamicDataSourceAnnotation(dataSource = DataSourceContextHolder.dataSource_comment)
	public void update(WfCourseCommentEntity wfCourseComment){
		wfCourseCommentDao.update(wfCourseComment);
	}
	
	@Override
	@DynamicDataSourceAnnotation(dataSource = DataSourceContextHolder.dataSource_comment)
	public void delete(Integer id){
		wfCourseCommentDao.delete(id);
	}
	
	@Override
	@DynamicDataSourceAnnotation(dataSource = DataSourceContextHolder.dataSource_comment)
	public void deleteBatch(Integer[] ids){
		wfCourseCommentDao.deleteBatch(ids);
	}

	@Override
	@DynamicDataSourceAnnotation(dataSource = DataSourceContextHolder.dataSource_comment)
	public List<WfCourseCommentEntity> queryGreat(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return wfCourseCommentDao.queryGreat(map);
	}
	
}
